<template>
  <div class="top-loading-container">
    <!-- 使用vant的loading组件 -->
    <van-loading 
      v-show="isLoading"
      class="loading-spinner"
      type="spinner"
      size="24px"
      color="#1989fa"
    />
  </div>
</template>

<script>
export default {
  name: 'TopLoading',
  props: {
    isLoading: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style scoped>
.top-loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 10px 0;
  background-color: rgba(255,255,255,0.9);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
</style>
